<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>netaddr.strategy.IPv4StrategyStd</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >netaddr</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="netaddr-module.html">Package&nbsp;netaddr</a> ::
        <a href="netaddr.strategy-module.html" onclick="show_private();">Module&nbsp;strategy</a> ::
        Class&nbsp;IPv4StrategyStd
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="netaddr.strategy.IPv4StrategyStd-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class IPv4StrategyStd</h1><p class="nomargin-top"><span class="codelink"><a href="netaddr.strategy-pysrc.html#IPv4StrategyStd">source&nbsp;code</a></span></p>
<pre class="base-tree">
  object --+    
           |    
<a href="netaddr.strategy.AddrStrategy-class.html">AddrStrategy</a> --+
               |
              <strong class="uidshort">IPv4StrategyStd</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
      <ul class="subclass-list">
<li><a href="netaddr.strategy.IPv4StrategyOpt-class.html">IPv4StrategyOpt</a></li>  </ul>
</dd></dl>

<hr />
<p>A 'safe' <a href="netaddr.strategy.AddrStrategy-class.html" 
  class="link">AddrStrategy</a> for IPv4 addresses. Unlike <a 
  href="netaddr.strategy.IPv4StrategyOpt-class.html" 
  class="link">IPv4StrategyOpt</a>.</p>
  <p>It contains all methods related to IPv4 addresses that the optimised 
  version has, without the reliance on the socket or struct modules. There 
  are several cases where the use of this class are preferable when either 
  the modules mentioned do not exist on certain Python implementations or 
  contain bugs like the infamous inet_aton('255.255.255.254') bug.</p>
  <p>All methods shared between the optimised class and this one should be 
  defined here.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="netaddr.strategy.IPv4StrategyStd-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Constructor.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="netaddr.strategy-pysrc.html#IPv4StrategyStd.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="netaddr.strategy.IPv4StrategyStd-class.html#int_to_arpa" class="summary-sig-name">int_to_arpa</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">int_val</span>)</span><br />
      Returns:
      The reverse DNS lookup for an IPv4 address in network byte order 
      integer form.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="netaddr.strategy-pysrc.html#IPv4StrategyStd.int_to_arpa">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netaddr.strategy.AddrStrategy-class.html">AddrStrategy</a></code></b>:
      <code><a href="netaddr.strategy.AddrStrategy-class.html#__repr__">__repr__</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#bits_to_int">bits_to_int</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#int_to_bin">int_to_bin</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#int_to_bits">int_to_bits</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#int_to_packed">int_to_packed</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#int_to_str">int_to_str</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#int_to_words">int_to_words</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#packed_to_int">packed_to_int</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#str_to_int">str_to_int</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#valid_bits">valid_bits</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#valid_int">valid_int</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#valid_str">valid_str</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#valid_words">valid_words</a></code>,
      <code><a href="netaddr.strategy.AddrStrategy-class.html#words_to_int">words_to_int</a></code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__setattr__</code>,
      <code>__str__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Class Variables</span></td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="netaddr.strategy.AddrStrategy-class.html">AddrStrategy</a></code></b>:
      <code><a href="netaddr.strategy.AddrStrategy-class.html#STRUCT_FORMATS">STRUCT_FORMATS</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="netaddr.strategy-pysrc.html#IPv4StrategyStd.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Constructor.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>width</code></strong> - size of address in bits. (e.g. 32 - IPv4, 48 - MAC, 128 - IPv6)</li>
        <li><strong class="pname"><code>word_size</code></strong> - size of each word. (e.g. 8 - octets, 16 - hextets)</li>
        <li><strong class="pname"><code>word_sep</code></strong> - separator between each word. (e.g. '.' - IPv4, ':' - IPv6, '-' - 
          EUI-48)</li>
        <li><strong class="pname"><code>word_fmt</code></strong> - format string for each word. (Default: '%x')</li>
        <li><strong class="pname"><code>addr_type</code></strong> - address type. (Default: AT_UNSPEC)</li>
        <li><strong class="pname"><code>word_base</code></strong> - number base used to convert each word using int(). (Default: 16)</li>
        <li><strong class="pname"><code>uppercase</code></strong> - uppercase address. (Default: False)</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="int_to_arpa"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">int_to_arpa</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">int_val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="netaddr.strategy-pysrc.html#IPv4StrategyStd.int_to_arpa">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>int_val</code></strong> - A network byte order integer.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>The reverse DNS lookup for an IPv4 address in network byte order 
          integer form.</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >netaddr</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jan 21 23:41:06 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
